#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 100
int a, b, c, d, e;
long long H[N + 1], k,  *p;
int cmp(const void *a, const void *b) {
  return *(long long*)a - *(long long*)b;
}

void fill() {
  int i;
  for (i = 1; i <= N; i++)
    H[i] = 1LL * i * i * i * i * i;
}

int main() {
  long long start = clock();
  fill();
  for (a = 1; a < N; a++)
    for (b = 1; b <=a; b++)
      for (c = 1; c <=b; c++)
        for (d = 1; d <=c; d++)
  for (e=1; e <=d; e++) {
    k = H[a] + H[b] + H[c] + H[d] + H[e];
    p = bsearch(&k, H + a+1, N - a-1, sizeof(H[0]), cmp);
    if (p)
            printf("%d %d %d %d %d %d\n", a, b, c, d, e, p - H);
  }
  long long end = clock();
  printf("%.2f\n", (end - start) / 1000.0);
  return 0;
}
